From 32b3928edab9732bcd26b4ba0a414fd3c6bebc43 Mon Sep 17 00:00:00 2001 From: William Hua Date: Mon, 5 Dec 2016 10:28:34 -0500 Subject: [PATCH] mir: fix build failures --- gdk/mir/gdkmirdisplay.c | 2 +- gdk/mir/gdkmirglcontext.c | 25 +++++++++++++------------ gdk/mir/gdkmirwindowimpl.c | 2 ++ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/gdk/mir/gdkmirdisplay.c b/gdk/mir/gdkmirdisplay.c index 5951e71213..a2ff6ec4c5 100644 --- a/gdk/mir/gdkmirdisplay.c +++ b/gdk/mir/gdkmirdisplay.c @@ -691,7 +691,7 @@ gdk_mir_display_make_gl_context_current (GdkDisplay *display, mir_context = GDK_MIR_GL_CONTEXT (context); window = gdk_gl_context_get_window (context); - if (mir_context->is_attached || gdk_gl_context_is_drawing (context)) + if (mir_context->is_attached || gdk_draw_context_is_drawing (context)) { egl_surface = _gdk_mir_window_get_egl_surface (window, mir_context->egl_config); diff --git a/gdk/mir/gdkmirglcontext.c b/gdk/mir/gdkmirglcontext.c index 4d358a66da..ca04255a58 100644 --- a/gdk/mir/gdkmirglcontext.c +++ b/gdk/mir/gdkmirglcontext.c @@ -103,7 +103,7 @@ gdk_mir_gl_context_get_damage (GdkGLContext *context) GdkDisplay *display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context)); EGLSurface egl_surface; GdkWindow *window = gdk_draw_context_get_window (GDK_DRAW_CONTEXT (context)); - unsigned int buffer_age = 0; + int buffer_age = 0; if (_gdk_mir_display_have_egl_buffer_age (display)) { @@ -141,22 +141,22 @@ gdk_mir_gl_context_get_damage (GdkGLContext *context) } static void -gdk_mir_gl_context_end_frame (GdkGLContext *context, +gdk_mir_gl_context_end_frame (GdkDrawContext *context, cairo_region_t *painted, cairo_region_t *damage) { - GdkGLContext *context = GDK_GL_CONTEXT (draw_context); - GdkWindow *window = gdk_gl_context_get_window (context); + GdkGLContext *gl_context = GDK_GL_CONTEXT (context); + GdkMirGLContext *context_mir = GDK_MIR_GL_CONTEXT (gl_context); + GdkWindow *window = gdk_gl_context_get_window (gl_context); GdkDisplay *display = gdk_window_get_display (window); - GdkMirGLContext *context_mir = GDK_MIR_GL_CONTEXT (context); EGLDisplay egl_display = _gdk_mir_display_get_egl_display (display); EGLSurface egl_surface; - GDK_DRAW_CONTEXT_CLASS (gdk_x11_gl_context_parent_class)->end_frame (draw_context, painted, damage); - if (gdk_gl_context_get_shared_context (context)) + GDK_DRAW_CONTEXT_CLASS (gdk_mir_gl_context_parent_class)->end_frame (context, painted, damage); + if (gdk_gl_context_get_shared_context (gl_context)) return; - gdk_gl_context_make_current (context); + gdk_gl_context_make_current (gl_context); egl_surface = _gdk_mir_window_get_egl_surface (window, context_mir->egl_config); @@ -212,12 +212,13 @@ gdk_mir_gl_context_dispose (GObject *gobject) static void gdk_mir_gl_context_class_init (GdkMirGLContextClass *klass) { - GdkGLContextClass *context_class = GDK_GL_CONTEXT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + GdkDrawContextClass *draw_context_class = GDK_DRAW_CONTEXT_CLASS (klass); + GdkGLContextClass *gl_context_class = GDK_GL_CONTEXT_CLASS (klass); - context_class->realize = gdk_mir_gl_context_realize; - context_class->get_damage = gdk_mir_gl_context_get_damage; - context_class->end_frame = gdk_mir_gl_context_end_frame; + gl_context_class->realize = gdk_mir_gl_context_realize; + gl_context_class->get_damage = gdk_mir_gl_context_get_damage; + draw_context_class->end_frame = gdk_mir_gl_context_end_frame; gobject_class->dispose = gdk_mir_gl_context_dispose; } diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c index 069a6b0c40..72535a1881 100644 --- a/gdk/mir/gdkmirwindowimpl.c +++ b/gdk/mir/gdkmirwindowimpl.c @@ -974,11 +974,13 @@ gdk_mir_window_impl_begin_paint (GdkWindow *window) static void gdk_mir_window_impl_end_paint (GdkWindow *window) { +#if 0 GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl); //g_printerr ("gdk_mir_window_impl_end_paint window=%p\n", window); if (impl->visible && !window->current_paint.use_gl) send_buffer (window); +#endif } static cairo_region_t * -- 2.30.2